package Solutions

func isIsomorphic(s string, t string) bool {
    var mp1=make(map[byte]byte,len(s))
    var mp2=make(map[byte]byte,len(s))
    for i:=0;i<len(s);i++{
        if v,ok:=mp1[s[i]];ok{
            if t[i]!=v||mp2[t[i]]!=s[i]{
                return false
            }
        }else{
            if v,ok:=mp2[t[i]];ok{
                if s[i]!=v{
                    return false
                }
            }else{
                mp2[t[i]]=s[i]
            }
           mp1[s[i]]=t[i]
        }
    }
    return true
}